package cn.turing.firecontrol.device.rest;

import cn.turing.firecontrol.auth.client.annotation.CheckClientToken;
import cn.turing.firecontrol.auth.client.annotation.CheckUserToken;
import cn.turing.firecontrol.common.msg.TableResultResponse;
import cn.turing.firecontrol.common.util.Query;
import cn.turing.firecontrol.device.biz.DeviceBuildingBiz;
import cn.turing.firecontrol.device.biz.DeviceSensorBiz;
import cn.turing.firecontrol.device.entity.DeviceSensor;
import cn.turing.firecontrol.device.util.SplitUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

/**
 * @author : 赵贤
 * @create: 2023-04-07 14:35
 * @Description:
 */
@RestController
@RequestMapping("zx")
@CrossOrigin
@CheckClientToken
@CheckUserToken
public class DeviceEasyexcel {


    @Autowired
    protected DeviceSensorBiz dsBiz;

    @Autowired
    protected DeviceBuildingBiz dbBiz;

    @RequestMapping(value = "/test", method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation("分页查询数据，按条件查询")
    public List<DeviceSensor> list(DeviceSensor deviceSensor) {
        List<DeviceSensor> deviceSensors = dsBiz.selectByChannelId(deviceSensor.getChannelId());
        System.err.println(deviceSensors);
        return deviceSensors;
    }




}
